package com.airwallex.strategy.util;

import com.airwallex.model.ExpParam;
import com.airwallex.strategy.CalculateStrategy;

import java.util.List;
import java.util.Stack;

/**
 * 运算策略上下文
 */
public class CalculatorContext {
    private CalculateStrategy calculateStrategy;

    //设置策略
    public void setCalculateStrategy(CalculateStrategy calculateStrategy) {
        this.calculateStrategy = calculateStrategy;
    }

    //执行运算
    public void execCalc(Stack<ExpParam> numbers, Stack<List<ExpParam>> logs){
        calculateStrategy.execCalc(numbers, logs);
    }

}
